package com.design.proxy.force;

/**
 * @ClassName GamePlayerProxy.java
 * @Description 代练
 * 		可实现多个接口完成不同的任务
 * @author Jon
 * @date 2018年6月14日 上午11:16:06
 */
public class GamePlayerProxy implements IGamePlayer,Iproxy {
	private IGamePlayer iGamePlayer = null;

	public GamePlayerProxy(IGamePlayer iGamePlayer){
		this.iGamePlayer = iGamePlayer;
	}
	
	@Override
	public IGamePlayer getProxy() {
		return iGamePlayer.getProxy();
	}

	@Override
	public void login(String loginName, String password) {
		iGamePlayer.login(loginName, password);
	}

	@Override
	public void killBoss() {
		iGamePlayer.killBoss();
		calculateKillBoss();
	}

	@Override
	public void upgrade() {
		iGamePlayer.upgrade();
		calculateUpgrade();
	}

	@Override
	public void calculateKillBoss() {
		System.out.println("击杀BOSS费用：100元");
	}

	@Override
	public void calculateUpgrade() {
		System.out.println("升级费用：50元");
	}
}
